Support Gift transaction event, map timeline events using customerSupportChat payload when available#184
Draft
NiklasRosenstein wants to merge 8 commits intomasterfrom
Draft
Support Gift transaction event, map timeline events using customerSupportChat payload when available#184NiklasRosenstein wants to merge 8 commits intomasterfrom
NiklasRosenstein wants to merge 8 commits intomasterfrom
Conversation
…portChat payload when available
| "benefits_spare_change_execution": ConditionalEventType.TRADE_INVOICE, | ||
| "TRADE_INVOICE": ConditionalEventType.TRADE_INVOICE, | ||
| # Gifting | ||
| "GIFTER_TRANSACTION": PPEventType.TRANSFER_OUT, |
Collaborator
Author
There was a problem hiding this comment.
Not exactly sure yet if this is the right category to assign it to. In the export_transactions result, it will be labelled as Transfer (Outbound).
Comment on lines
+139
to
+141
| self.log.warning("Missing timeline event %r for detail: %s", timeline_event_id, json.dumps(response)) | ||
| self.skipped_detail += 1 | ||
| return |
Collaborator
Author
There was a problem hiding this comment.
Now that I have a better understanding of this code, I think this code makes more sense than what I introduced in #161.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses #183 to process the
timelineDetailV2object for a TR gift that was sent by the user (I cannot test it the other way around since I have not received a gift on my account).It does so by, instead of relying on the
timelineDetailV2"id" field, which seems to differ from the corresponding timeline event object in this particular case, but instead to use thecustomerSupportChatpayload'stimelineEventIdif it is available. Overall, this should make the timeline detail processing more robust.I've also started to add type hints on the new code that I introduced here.